]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
inputMethod: Honor the HIDDEN_TEXT hint of IBusInputHint
authorJoan Torres Lopez <joantolo@redhat.com>
Thu, 29 Jan 2026 13:04:40 +0000 (14:04 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 5 Feb 2026 16:09:29 +0000 (17:09 +0100)
Makes the pre-edit text hidden with a "_".

This hint was added in IBus 1.5.34, although if IBus doesn't support it,
it will silently fallback to no-op which is fine.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4053>
(cherry picked from commit a39035fda4e1cf487b83483e2d4fe41a830d7fea)

js/misc/inputMethod.js

index ee7716628f6403ced09c05ce30f215130e986c44..caa106788faf3511b131ba44d5caa6febf2a4cb6 100644 (file)
@@ -292,6 +292,8 @@ export const InputMethod = GObject.registerClass({
             ibusHints |= IBus.InputHints.UPPERCASE_WORDS;
         if (hints & Clutter.InputContentHintFlags.SENSITIVE_DATA)
             ibusHints |= IBus.InputHints.PRIVATE;
+        if (hints & Clutter.InputContentHintFlags.HIDDEN_TEXT)
+            ibusHints |= IBus.InputHints.HIDDEN_TEXT;
 
         this._hints = ibusHints;
         if (this._context)